luci-app-travelmate: update 2.3.0-2
authorDirk Brenken <[email protected]>
Sun, 14 Dec 2025 22:10:08 +0000 (23:10 +0100)
committerDirk Brenken <[email protected]>
Sun, 14 Dec 2025 22:10:08 +0000 (23:10 +0100)
* fix a small issue in the new log-template

Signed-off-by: Dirk Brenken <[email protected]>
applications/luci-app-travelmate/Makefile
applications/luci-app-travelmate/htdocs/luci-static/resources/view/travelmate/logtemplate.js

index 4ad673344fbda02dcbee56825f9aacf6b6a4d52a..648960f3977f3fe6e8f804d383fb3bf507d56f5a 100644 (file)
@@ -7,7 +7,7 @@ LUCI_TITLE:=LuCI support for Travelmate
 LUCI_DEPENDS:=+luci-base +luci-lib-uqr +travelmate
 
 PKG_VERSION:=2.3.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_LICENSE:=Apache-2.0
 PKG_MAINTAINER:=Dirk Brenken <[email protected]>
 
index 10c552721f3fee1f2134633f4305b07070cd33b6..c26aa23bbdff91d61c2cd09f7c91d17a58e070f6 100644 (file)
@@ -18,25 +18,24 @@ function Logview(logtag, name) {
                                        const logEl = document.getElementById('logfile');
                                        if (!logEl) return;
 
-                                       const entries = res?.log ?? [];
-                                       if (entries.length > 0) {
-                                               const filtered = entries
-                                                       .filter(entry => !logtag || entry.msg.includes(logtag))
-                                                       .map(entry => {
-                                                               const d = new Date(entry.time);
-                                                               const date = d.toLocaleDateString([], {
-                                                                       year: 'numeric',
-                                                                       month: '2-digit',
-                                                                       day: '2-digit'
-                                                               });
-                                                               const time = d.toLocaleTimeString([], {
-                                                                       hour: '2-digit',
-                                                                       minute: '2-digit',
-                                                                       second: '2-digit',
-                                                                       hour12: false
-                                                               });
-                                                               return `[${date}-${time}] ${entry.msg}`;
-                                                       });
+                                       const filtered = (res?.log ?? [])
+                                       .filter(entry => !logtag || entry.msg.includes(logtag))
+                                       .map(entry => {
+                                               const d = new Date(entry.time);
+                                               const date = d.toLocaleDateString([], {
+                                                       year: 'numeric',
+                                                       month: '2-digit',
+                                                       day: '2-digit'
+                                               });
+                                               const time = d.toLocaleTimeString([], {
+                                                       hour: '2-digit',
+                                                       minute: '2-digit',
+                                                       second: '2-digit',
+                                                       hour12: false
+                                               });
+                                               return `[${date}-${time}] ${entry.msg}`;
+                                       });
+                                       if (filtered.length > 0) {
                                                logEl.value = filtered.join('\n');
                                        } else {
                                                logEl.value = _('No %s related logs yet!').format(name);